package org.jeecg.modules.storage.job;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.storage.service.IBussDeductGoodsService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 发送消息任务
 * @author: jeecg-boot
 */

@Slf4j
public class AutoDeductGoodsJob implements Job {

	@Autowired
	private IBussDeductGoodsService iBussDeductGoodsService;

	@Override
	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
		log.info(String.format(" Jeecg-Boot 发送消息任务 SendMsgJob !  时间:" + DateUtils.getTimestamp()));
		iBussDeductGoodsService.autoDeductGoods();;
		log.info(" 定时扣货完成"+jobExecutionContext.getJobDetail().getKey());
	}

}
